package com.vitabuybuy.tv.dto;

import com.vitabuybuy.tv.utils.LanaugeUtils;

/**
 * 作者：SimGa
 * 日期：2021/1/19
 * 时间：17:51
 * 包名：com.vitabuybuy.tv.dto
 */
public class MyCommentDetailDto {


    /**
     * images : http://106.55.47.138/attachment/png/3000/2198_7650.png,http://106.55.47.138/attachment/png/3029/2199_7679.png
     * item : {"specifications":"{\"EN\":\"s white\",\"CN\":\"小 白色\",\"MA\":\"x Wei\"}"}
     * product : {"name":"{\"MA\":\"Uniqlo nouveau pull\",\"EN\":\"Uniqlo xinpin sanitary ware\",\"CN\":\"优衣库新品卫衣\"}","id":91}
     * scores : 4
     * createTime : 2021-01-19 17:41:38
     * id : 18
     * content : 我觉得真的很不错
     * order : {"id":544}
     */

    private String images;
    private String videos;
    private String cover;

    public String getVideos() {
        return videos;
    }

    public void setVideos(String videos) {
        this.videos = videos;
    }

    public String getCover() {
        return cover == null ? "" : cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    /**
     * specifications : {"EN":"s white","CN":"小 白色","MA":"x Wei"}
     */

    private ItemBean item;
    /**
     * name : {"MA":"Uniqlo nouveau pull","EN":"Uniqlo xinpin sanitary ware","CN":"优衣库新品卫衣"}
     * id : 91
     */

    private ProductBean product;
    private int scores;
    private String createTime;
    private int id;
    private String content;
    /**
     * id : 544
     */

    private OrderBean order;
    private MyCommentDto.StoreBean store;


    public MyCommentDto.StoreBean getStore() {
        return store;
    }

    public void setStore(MyCommentDto.StoreBean store) {
        this.store = store;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public ItemBean getItem() {
        return item;
    }

    public void setItem(ItemBean item) {
        this.item = item;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public int getScores() {
        return scores;
    }

    public void setScores(int scores) {
        this.scores = scores;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return LanaugeUtils.returnStrByLocation(content);
    }

    public void setContent(String content) {
        this.content = content;
    }

    public OrderBean getOrder() {
        return order;
    }

    public void setOrder(OrderBean order) {
        this.order = order;
    }

    public static class ItemBean {
        private String specifications;

        public String getSpecifications() {
            String[] split = specifications.split(";");
            specifications = "";
            for (String spec : split) {
                String str = LanaugeUtils.returnStrByLocation(spec);
                specifications = specifications.concat(str).concat(";");
            }
            return specifications.isEmpty() ? specifications : specifications.substring(0, specifications.length() - 1);
        }

        public void setSpecifications(String specifications) {
            this.specifications = specifications;
        }
    }

    public static class ProductBean {
        private String name;
        private String thumbnail;
        private int id;

        public String getThumbnail() {
            return thumbnail;
        }

        public void setThumbnail(String thumbnail) {
            this.thumbnail = thumbnail;
        }

        public String getName() {
            return LanaugeUtils.returnStrByLocation(name);
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }
    }

    public static class OrderBean {
        private int id;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }
    }
}
